/*
*私募产品列表
*Home.js*/

import React, {Component,PropTypes} from 'react';
import {connect} from 'dva';
import {routerRedux,Link,withRouter } from 'dva/router';
import { Row,Col,Button,Card} from 'antd';
import Tabtitle from '../../../components/common/TabTitle';
import {PrivateMgSelect,PrivatePdtSelect} from '../components/SelectToolBar';
import PrivateTable from './component/privateTable';
import AddPrivatePdt from '../components/AddPrivatePdt';
import PdtSearch from '../../../components/common/Search';
import style from './home.less';

const PrivatePdt = ({dispatch,privatePdt,location:{pathname,query}}) => {
	console.log('PrivatePdt>',privatePdt)
	const tag = 'privatePdt';
	function onFormQuery(Values){
		const v = Values.values.keyname;
		dispatch({
      type: 'privatePdt/getPrivatePdt',
      payload:{
				'productType':'SIMU',
				'currentpage':1,
				'pagesize':15,
				'name':v
			}
		})
		console.log('onFormQuery>>>',Values.values.keyname)
	}
	return (
		<div>
			<Tabtitle value={'私募产品列表'}/>
			<div className="page-privatePdt-home content-inner">
				<div className={style.privatebtn}>
					<Row  type="flex" justify="start" align="middle" >
						<span>产品名称: </span>
						<PdtSearch
							buttonText="查询"
							onQuery={onFormQuery}
						/>
						<AddPrivatePdt
							tag={tag}
						/>
					</Row>
				</div>
				
				<Card>
					<PrivateTable/>
				</Card>
			</div>
		</div>
	)
}

PrivatePdt.propTypes = {}

export default connect(({privatePdt})=>({privatePdt}))(PrivatePdt)